package com.zp.observer;/**
 * @description
 * @author zp
 * @created 2021/9/3 23:47
 */

/**
 * @author zp
 * @description
 * @created 2021/9/3 23:47
 */
public class ObserverPatternDemo {
    public static void main(String[] args) {
        YoungObserver youngObserver = new YoungObserver();
        OldObserver oldObserver = new OldObserver();
        Subject subject = new Subject();
        subject.addObserver(youngObserver);
        subject.addObserver(oldObserver);
        subject.updateAllObserver();
    }
}
